package org.amphiprion.rfreplayanalyser.ui.race;

import java.awt.Color;

public class DriverItem {
	public long driverId;
	public Color color = new Color((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random() * 255));
	public int currentLap;
	public boolean running;
	public float currentLapTime;
	public String driverName;
	public String notRunningReason;
	public boolean shown = true;

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (driverId ^ driverId >>> 32);
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		DriverItem other = (DriverItem) obj;
		if (driverId != other.driverId) {
			return false;
		}
		return true;
	}

}
